<!DOCTYPE html>
<html>
<head>
    <title>考试模板表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <i-col span="4">
                <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
            </i-col>
            <i-button class="btn btn-primary" @click="query">查询</i-button>
			<#if shiro.hasPermission("lanling:examtemplate:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("lanling:examtemplate:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("lanling:examtemplate:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <i-form ref="formValidate" :model="examTemplate" :rules="ruleValidate" :label-width="80"
                class="form-horizontal" >
            <Form-item label="科目" prop="subjectId">
                <i-select v-model="examTemplate.subjectId" filterable label-in-value>
                    <i-option v-for="item in subjectList" :value="item.id"
                              :key="item.id">{{item.subjectName}}
                    </i-option>
                </i-select>
            </Form-item>
            <Form-item label="试卷名称" prop="examName">
                <i-input v-model="examTemplate.examName" placeholder="试卷名称"/>
            </Form-item>
            <Form-item label="考试时间（分钟）" prop="examMinute">
                <Input-number style="width: 188px;" :min="1" v-model="examTemplate.examMinute" placeholder="序号越大，排序越前"/>
            </Form-item>
            <Form-item label="注意事项" prop="announcements">
                <textarea v-model="examTemplate.announcements" placeholder="注意事项" :rows="4" style ="width:100%;"></textarea>
            </Form-item>
            <Form-item label="单选题数量" prop="radioNumber">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.radioNumber" placeholder="单选题数量"/>
            </Form-item>
            <Form-item label="多选题数量" prop="checkNumber">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.checkNumber" placeholder="多选题数量"/>
            </Form-item>
            <Form-item label="判断题数量" prop="judegNumber">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.judegNumber" placeholder="判断题数量"/>
            </Form-item>
            <Form-item label="单选题分数（每题）" prop="radioScore">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.radioScore" placeholder="每题单选题分数"/>
            </Form-item>
            <Form-item label="多选题分数（每题）" prop="checkScore">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.placeholder" placeholder="每题多选题分数"/>=
            </Form-item>
            <Form-item label="判断题分数（每题）" prop="judegScore">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.judegScore" placeholder="每题判断题分数"/>=
            </Form-item>
            <Form-item label="总题数" prop="sumQuestionNumber">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.sumQuestionNumber" placeholder="总题数"/>=
            </Form-item>
            <Form-item label="总分数" prop="sumScore">
                <Input-number style="width: 188px;" :min="0.1" v-model="examTemplate.sumScore" placeholder="总分数"/>=
            </Form-item>
            <Form-item label="排序号" prop="sort">
                <Input-number style="width: 188px;" :min="0" v-model="examTemplate.sort" placeholder="序号越大，排序越前"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
            </Form-item>
        </i-form>
    </div>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/lanling/examtemplate.js?_${.now?long}"></script>
</body>
</html>